package com.example.minisqlite;

import java.sql.SQLException;
import java.util.List;

public class CreateTableStatement implements Statement {

    private final String tableName;
    private final List<ColumnDefinition> columns;

    public CreateTableStatement(String tableName, List<ColumnDefinition> columns) {
        this.tableName = tableName;
        this.columns = columns;
    }

    @Override
    public ResultSet execute(Engine engine) throws SQLException {
        return engine.createTable(tableName, columns);
    }
}
